package com.fpd.tools.redis;

import com.fpd.model.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class RedisProducer{

    @Autowired
    private RedisTemplate redisTemplate;

    public ResultVO importFileProduce(String importFileNameId,String filePath,String thirdPartyId){
    	System.out.println("===放入redis===");
        Map<String,String> map = new HashMap<>();
        map.put("importFileNameId",importFileNameId);
        map.put("filePath",filePath);
        map.put("thirdPartyId",thirdPartyId);
        redisTemplate.opsForList().leftPush("importFileList",map);
        return new ResultVO("000");
    }
}
